REGISTER
, MAP
, and ATTACHMENT
.
To summarize, Ditto’s causal consistency feature ensures consistency across related changes by allowing concurrent messages to appear in any order while maintaining consistency.
UInt128
data type to represent the Site_ID
and 64bit
timestamp in Ditto; however, for simplicity, the following scenario uses basic string
and number
types instead.A
document: 123abc
links to a version vector that indicates:5
.
B
changes were incorporated and merged at version 1
.
C
changes were incorporated and merged at vector version 4
.
A
receives document changes from remote Peer B
. The incoming document’s version vector indicates:B
incoming version vector is value 4
.
B
changes were of version 1
; a value less than the incoming document version vector value of 4
.
4
is greater than 1
, the local Peer A
determines that the changes are new and should be incorporated and merged in order to remain consistent.appID
.
To give an intuition about causal consistency, imagine the following scenario:
On a social network, Bob posts a message: